package cn.jaye.fabric.common.schedul;

import cn.jaye.fabric.domain.service.BlockChainService;
import cn.jaye.fabric.domain.service.CalculateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;

/**
 * @author Jaye
 * @create 2018-06-05 10:39
 */
@Configuration
@EnableScheduling
public class SchedulingTask {

    @Autowired
    private CalculateService calculateService;


    @Autowired
    private BlockChainService blockChainService;


//    @Scheduled(cron = "0 0/3 * * * ?")
//    public void calculateResult() {
//        calculateService.calculateResult();
//    }
//
//
//    @Scheduled(cron = "0 0/3 * * * ?")
//    public void recordBlockChain() {
//        blockChainService.recordResult();
//    }

    public void checkBlockChain() {
        blockChainService.checkUser();
    }
}
